package handler

import (
	"context"

	"github.com/gogf/gf/v2/frame/g"
	"kg_api/apiv1"
)

var (
	Hello = handlerHello{}
)

type handlerHello struct{}

func (a *handlerHello) Hello(
	ctx context.Context,
	req *apiv1.HelloReq,
) (res *apiv1.HelloRes, err error) {
	info := g.Map{
		"name": "gf",
		"age":  18,
	}
	g.RequestFromCtx(ctx).Response.Writeln(info)
	return
}
